import request from "@/utils/request";

// 用户管理数据列表请求
export const getUserInfoApi = params => {
        return request({
<<<<<<< HEAD
                url: 'permission/user',
=======
        url: '/permission/user',
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'GET',
                params: params
        })
}
// 用户管理 新增 用户项
export const PostUserInfoApi = data => {
        return request({
<<<<<<< HEAD
                url: 'permission/user',
=======
        url: '/permission/user',
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'POST',
                data
        })
}

// 显示状态请求
export const UseUserInfoApi = data => {
        return request({
<<<<<<< HEAD
                url: `permission/user/${data.id}/${data.hidden}`,
=======
        url: `/permission/user/${data.id}/${data.hidden}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'GET',
                data
        })
}
// 查询单个用户项
export const OneUserInfoApi = data => {
        return request({
<<<<<<< HEAD
                url: `permission/user/${data.id}`,
=======
        url: `/permission/user/${data.id}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'GET',
                data
        })
}
// 查询单个用户项
export const PutUserInfoApi = data => {
        return request({
<<<<<<< HEAD
                url: `permission/user/${data.id}`,
=======
        url: `/permission/user/${data.id}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'put',
                data
        })
}
// 删除用户项
export const delUserInfoApi = data => {
        return request({
<<<<<<< HEAD
                url: `permission/user/${data.id}`,
=======
        url: `/permission/user/${data.id}`,
>>>>>>> f813540e5411455e7f6aef78f278a4ef7a04d3d2
                method: 'DELETE',
                data
        })
}

export const uploadImg = data => {
        return request({
                url: "/index/upload?mode=base64&type=image",
                method: "POST",
                data
        })
}